<?php
/**
 * Created by PhpStorm.
 * User: lijie
 * Date: 2018/10/7
 * Time: 9:04
 */
namespace app\reserve\validate;

use think\Validate;

class Orderwash extends Validate{

    protected $rule = [
        'id'                => ['require','number'],
        'u_id'              => ['require','number'],
        'wash_id'           => ['require','number'],
        'washpro_id'        => ['require','number'],
        'pay_price'         => ['require'],
        'pagenum'           => ['require','number'],
        'listNum'           => ['require','number']
    ];

    protected $message = [
        'id'                => 'id不能为空',
        'u_id'              => 'u_id不能为空',
        'wash_id'           => 'wash_id不能为空',
        'washpro_id'        => 'washpro_id不能为空',
        'pay_price'         => 'pay_price不能为空',
        'pagenum'           => '页数不能为空',
        'listNum'           => '条数不能为空'
    ];

    protected $scene = [
        // 创建订单
        'addOrderwash'      => ['u_id','wash_id','washpro_id','pay_price'],
        //  编辑
        'editOrderwash'     => ['id'],
        // 列表
        'selectOrderwash'   => ['pagenum','listNum'],
    ];
}